<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>选择座位</title>
    <link th:include="common::com_css">
</head>
<body>
<div th:replace="common::#member_leftmenu"></div>
<div class="main-content">
    <div th:replace="common::#member_headermenu"></div>
    <div th:replace="common::#com_alert"></div>
    <div th:if="${rowPiece}!=null">
        <input type="hidden" id="s1" th:value="${rowPiece.sitState}" >
        <section class="panel">
            <form method="post" th:action="@{/chooseSit}">
                <input name="accountId" type="hidden" th:value="${session.member.id}">
                <input name="rowpieceId" type="hidden" th:value="${rowPiece.id}">
                <header class="panel-heading">
                    <label class="label label-info" id="label-info">请选择座位：</label>
                    <span class="tools pull-right">
                <button class="btn btn-search" onclick="writeHtml();return false;">清空选择</button>
             </span>
                </header>
                <div class="panel-body">
                    <div class="row col-lg-10" style="padding: 0px 15px;margin: 0px;font-size: 15px">
                        <p>电影名称：<span th:text="${rowPiece.filmName}"></span></p>
                    </div>
                    <div class="row col-lg-10"style="padding: 0px 15px;margin: 0px;font-size: 15px">
                        <p>播放影厅：<span th:text="${rowPiece.screensName}"></span></p>
                    </div>
                    <div class="row col-lg-10"style="padding: 0px 15px;margin: 0px;font-size: 15px">
                        <p>播放时间：<span th:text="${rowPiece.playingTime}"></span></p>
                    </div>
                    <div class="row col-lg-10"style="padding: 0px 15px;margin: 0px;font-size: 15px">
                        <input type="hidden" id="fare" th:value="${rowPiece.fare}">
                        <p>票价：
                            <span class="text-danger">
                                <span class="fa fa-yen"></span>
                                <span th:text="${rowPiece.fare}"></span>
                            </span>
                            <span id="sit_num" class="text-info"></span>
                        </p>
                    </div>
                    <div class="row col-lg-10" >
                        <input type="hidden" name="sitNum" id="sitNum">
                        <div class="col-sm-12 col-md-12 col-lg-12" id="panel-body"  >
                        </div>
                    </div>
                    <div class="col-lg-10 row" style="padding: 15px 15px;margin: 0px;">
                        <input name="orderPrice" id="orderPrice" type="hidden">
                        <input class="btn btn-primary" id="sub" type="submit" value="提交订单">
                    </div>
                </div>
            </form>
        </section>
    </div>
    <div th:if="${rowPiece}==null and ${msg.code}==200 and ${order}!=null">
        <div class="row" style="text-align: center">
            <a class="btn btn-success p1" put_url="/PayOrder" th:put_id="${order.id}" >去支付</a>
            <a class="btn btn-warning d1" put_url="/cancelOrder" th:put_id="${order.id}">取消订单</a>
        </div>
    </div>
</div>
<form id="delEmpRorm" method="post">
    <input type="hidden" id="d_id" name="id">
</form>
<div th:replace="common::#com_js"></div>
<script>
    jQuery(document).ready(function() {
        EditableTable.init();
    });
    $(".p1").click(function () {
        var d=window.confirm("确定支付该订单？");
        if(d) {
            $("#d_id").attr("value", $(this).attr("put_id"));
            $("#delEmpRorm").attr("action", $(this).attr("put_url")).submit();
            return false;
        }
    });
    $(".d1").click(function () {
        var d=window.confirm("确定取消该订单？取消则交易失败。");
        if(d) {
            $("#d_id").attr("value", $(this).attr("put_id"));
            $("#delEmpRorm").attr("action", $(this).attr("put_url")).submit();
            return false;
        }
    });
</script>
<script src="/static/js/myJs/seating_info_utils.js"></script>
</body>
</html>